//
//  SLMessage.h
//  MyChatDemo
//
//  Created by DragonYao on 2017/10/9.
//  Copyright © 2017年 DragonYao. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef NS_ENUM(NSUInteger, MessageType) {
    MessageTypeText = 1,    //文本
    MessageTypeImage,       //图片
    MessageTypeAudio,       //音频
    MessageTypeVideo        //视频
};

typedef NS_ENUM(NSUInteger, MessageFrom) {
    MessageFromMe,   //自己发的
    MessageFromOther
};

@interface SLMessage : NSObject

@property (nonatomic, copy) NSString *icon;
@property (nonatomic, copy) NSString *userId;
@property (nonatomic, copy) NSString *timeString;
@property (nonatomic, copy) NSString *nickname;

//信息
@property (nonatomic, strong) NSString *contentText;
@property (nonatomic, strong) UIImage *picture;
@property (nonatomic, strong) NSData *voiceData;
@property (nonatomic, strong) NSString *voiceTime;

@property (nonatomic, assign) MessageType msgType;
@property (nonatomic, assign) MessageFrom msgFrom;

@property (nonatomic, assign) BOOL isShowDate;//是否显示日期或者时间

- (instancetype)initWithModel:(NSDictionary *)model;

@end
